package com.xinongbest.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * @author lemonwan
 * 数据库连接类
 */
public class DruidUtils {

    /**
     * 构造方法私有化
     */
    private DruidUtils() {

    }

    private final static DruidDataSource druidDataSource = new DruidDataSource();

    static {
        druidDataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://10.1.1.181:3306/java?characterEncoding=utf-8");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("990106");
    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }
}
